home *** CD-ROM | disk | FTP | other *** search
- /* Copyright, 1990, Regents of the University of Colorado */
- #define BOOL char
- #define TRUE 1
- #define FALSE 0
- #define MAXNAMESIZE 128
-
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-
- extern void exit();
-
- int main(argc, argv)
- int argc;
- char *argv[];
- {
- struct stat buf1, buf2;
- int I;
- BOOL new = FALSE;
- char filename[MAXNAMESIZE];
-
- if (argc < 6)
- {
- (void) fprintf(stderr, "Incorrect number of arguments to dinochk1.\n");
- exit(1);
- }
-
- if (stat(argv[1], &buf1) != 0)
- {
- (void) fprintf(stderr, "dinochk1 unable to access %s.\n", argv[1]);
- exit(1);
- }
-
- if (strcmp(argv[2], "new") == 0)
- new = TRUE;
-
- for (I = 5; I < argc; I++)
- {
- if (new)
- (void) sprintf(filename, "%s.%s.%s.c", argv[3], argv[4], argv[I]);
- else
- (void) sprintf(filename, "%s%s.c", argv[I], argv[4]);
- if (stat(filename, &buf2) != 0)
- exit(1);
- if (buf1.st_mtime > buf2.st_mtime)
- exit(1);
- }
- return(0);
- }
-
-